package com.djz.stuinfomge.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.djz.stuinfomge.dao.ISpecialityDAO;
import com.djz.stuinfomge.entity.Speciality;
import com.djz.stuinfomge.entity.PageBean;
import com.djz.stuinfomge.exception.PageNumOutOfRange;
import com.djz.stuinfomge.service.SpecialityService;

@Service
public class SpecialityServiceImpl extends BaseServiceImpl<Speciality> implements SpecialityService{

	public PageBean<Speciality> getPage(Integer id, Integer size, Speciality bean)
			throws PageNumOutOfRange {
		
		return getDAO().getPage(id, size, bean);
	}

	public List getSpecialityByName(String name) {
		return null;
	}

	
    @Autowired
    public void setDAO(ISpecialityDAO dao) {
	this.dao = dao;
    }

    public ISpecialityDAO getDAO() {
	return (ISpecialityDAO) dao;
    }

	public List<Speciality> topLevelCategory() {
		return getDAO().topLevelCategory();
	}
}
